<template><!-- 仓库详情 -->
  <div class="my-invoice-detail">  
    <row title="仓库名称"  :value="detail.name"></row>
    <row title="仓库地址"  :value="detail.province + detail.city + detail.district + detail.address"></row>
    <row title="联系人"  :value="detail.contacts"></row>
    <row title="联系电话"  :value="detail.telephone"></row>
    
    <div class="btn-box">   
       <div class="isbtn rightline" @click="goChange">修改</div>
    </div>
    <confirm v-model="confirm_show"
        :title="confirm.title"   
        @on-confirm="onConfirm" >
        <p style="text-align:center;">{{ confirm.content }}</p>
      </confirm>
  </div>
</template>

<script>
import row from '@/components/row'
import api from '@/api/api.js' 
import { Confirm } from 'vux'
import { Message } from 'element-ui' 
export default { 
  components: {
    row,
    Confirm
  },
  data () {
    return {
        confirm:{
            content:'',
            title:'',
        },
        confirm_show:false,
      detail:{ 
          
      }
    }
  },
  mounted () {
    this.getDetail();
  },
  filters: {
     
  },
  methods: {  
    onConfirm(){
        if(this.act_idx==1){//执行冻结
            this.setStoreStatus('0')
        }else if(this.act_idx==2){//解除冻结
            this.setStoreStatus(1)
        }
    },
    //修改仓库
    goChange(){
        this.$router.push({path:'/warehouseEdit',query:{ id: this.$route.query.id }})
    },
     
    // 获取详情
    getDetail(id){
        // api.warehouseMng.shopDetail({
        //     "storeId": id
        // },res=>{ 
        //     this.detail = res.result;
        // })
        this.detail=this.$store.state.warehouseDetail; 

    }
  }
}
</script>
<style lang="less" scoped>
.invoice-photo{
    padding: 12px 16px;
}
.map-title{
    height: 40px;
    line-height: 40px;
    font-size: 16px;
    font-weight: bold;
}
.invoice-photo-img{
   width: 100%;
   min-width: 74px;
   min-height: 74px;
   background: #ccc;
}
.invoice-order{
    display: flex;
    height: 40px;
    line-height: 40px;

}
.invoice-number{
    color: #444;
    width: 35%;
    padding-left: 8px;
}
.tips{
    color: #999;
    font-size: 11px;
    margin-left: 8px;
}
.invoice-money{
    color: #999;
    width: 30%;
}
.invoice-timer{
   color: #666; 
   width: 35%;
}
.invoice-active{
    background: #e1e1e1;
}
.wrap-box{
    display: flex;
    flex-wrap: wrap;
    img{
        margin-bottom: 10px;
        margin-right: 10px;
        width: 74px;
        height: 74px;
        background: #bbb;    }
}
.btn-box{
    display: flex;
    background: #fff;
    height: 50px;
    box-sizing: border-box;
    position: fixed;
    box-shadow: 0 0 7px 0 rgba(0, 0, 0, 0.06);;
    bottom: 0;
    left: 0;
    right: 0;
    &>div{
        flex: 1;
        text-align: center;
        line-height: 50px;
    }
    .rightline{
        position: relative;
        &::before{
            content: '';
            right: 0;
            top: 18px;
            position: absolute;
            bottom: 18px;
            width: 1px;
            background: #e1e1e1;
        }
    }

}
</style>
